package com.zjsd.sqeybusiness.controller;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.domain.server.Sys;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Test {
    public static void main(String[] args) {

        /*String remark = "10年5月";
        if(StringUtils.isNotBlank(remark)){
            Integer i = remark.indexOf("年");
            String num = remark.substring(0,i);
            System.out.println(num);
        }*/

       /* BigDecimal amt = BigDecimal.ZERO;
        BigDecimal[] results = amt.divideAndRemainder(BigDecimal.valueOf(20));
        System.out.println(results[0]);
        System.out.println(results[1]);

        System.out.println(amt.add(new BigDecimal(10)));

*/
       /* SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 1);
//将小时至0
        calendar.set(Calendar.HOUR_OF_DAY, 0);
//将分钟至0
        calendar.set(Calendar.MINUTE, 0);
//将秒至0
        calendar.set(Calendar.SECOND,0);
//将毫秒至0
        calendar.set(Calendar.MILLISECOND, 0);
//获得当前月第一天
        Date startDate = calendar.getTime();
//将当前月加1；
        calendar.add(Calendar.MONTH, 1);
//在当前月的下一月基础上减去1毫秒
        calendar.add(Calendar.MILLISECOND, -1);
//获得当前月最后一天
        Date endDate = calendar.getTime();
        System.out.println("first day:" + sdf.format(startDate) +    "           end day is:" + sdf.format(endDate));
*/

       BigDecimal bigDecimal = new BigDecimal(390);

        BigDecimal t   = bigDecimal.divide(new BigDecimal(430),0,BigDecimal.ROUND_HALF_UP);

       System.out.println(t);

    }
}
